<?
/**
 * A Listener Type for test progress
 *
 * @author Ryan Gantt
 */
interface TestListener
{
   	/**
	 * An error occurred.
	 *
	 * @param test The test that caused an error to be thrown
	 * @param t The throwable object that was thrown in response to the Test error
	 */
	public function addError( Test $test, Throwable $t );
	
	/**
	 * A failure occurred.
	 *
	 * @param test The test that cause a failure to occur
	 * @param t The throwable object that was thrown in response to the Test failure
	 */
	public function addFailure( Test $test, AssertionFailedError $t );
	
	/**
	 * Perform cleanup operations on the test
	 *
	 * @param test The Test instance to perform cleanup operations on
	 */
	public function endTest( Test $test );
	
	/**
	 * Perform beginning operations on and in preperation of the Test
	 *
	 * @param test The Test instance to perform cleanup operations on
	 */
	public function startTest( Test $test );
}